<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    window.onload = function () {
        document.addEventListener("contextmenu", function (e) {
            e.preventDefault();
            console.log("hello world");
        });
        /*document.oncontextmenu = function (e) {
         e.preventDefault();
         console.log("hello world");
         };*/
    };

</script>
</html>